import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    navIndex:0,
    contentIndex:0,
    homeComponentIndex:'Recommend',
    slideDirection:'left',
    footerNav:1,
    showfooter:1
  },
  mutations: {
      switchNav(state,index) {
        state.navIndex = index;
      },
      switchNavContent(state,index) {
        state.navIndex = index;
        state.contentIndex = index;
      },
      switchhomeComponentIndex(state,obj) {
        state.navIndex = obj.index;
        state.homeComponentIndex = obj.homeComponentIndex;
        state.slideDirection = obj.slideDirection;
      },
      switchFooterNav(state,index) {
        state.footerNav = index;
      }
  },
  actions: {

  },
  modules: {

  }
});
